<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"  
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">  
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">  
<head>  
    <title>Admin Page</title>  
    <link rel="stylesheet" href="style3.css" type="text/css" media="screen" />  
</head>  
  
<body>  
<div class="container">
<div id="header">
</div>
<div id="sidenav"> <ul> <h2> Menu </h2>
<li class="sidemenu"> <a href="tab1.php"> Admin Page </a></br> </li>
<li class="sidemenu"> <a href="vendor_tab.php"> Vendor Page </a> </li>
</ul>
</div> 
<div id="centercontainer"> 
<div id="tabbed_box_1" class="tabbed_box">  
    <h4>Admin Page</h4>  
    <div class="tabbed_area">  
  <script src="function.js" type="text/javascript"></script> 
        <ul class="tabs">  
           <li><a href="javascript:tabSwitch_2(1, 3, 'tab_', 'content_');" id="tab_1" >Product</a></li> 
            <li><a href="javascript:tabSwitch_2(2, 3, 'tab_', 'content_');" id="tab_2">Category</a></li> 
            <li><a href="javascript:tabSwitch_2(3, 3, 'tab_', 'content_');" id="tab_3" class="active">Brand</a></li> 
        </ul>  
  
        <div id="content_1" class="content">  
            <ul>  
                <?php
				include("sqlconnect.php");

session_start();
error_reporting(0);


	?>
	<div align="right">
	<a href="logout.php"> Log Out </a>
	</div>
	<div align="center">
	
	<form name="myform" action="check.php" method="post">
		Product Name:
		<input name="p_name" type="text" /></br>
		Product Price:
		<input name="p_price" type="text" /></br>
		Vendor Name:
		<input name="v_name" type="text" /></br>
		Categories:
		<select>
		<?php 
		$query="SELECT category_name FROM category_list";
		$result=mysql_query($query);
		$num=mysql_numrows($result);
		$i=0;
		while($i<$num)
		{

		$field3=mysql_result($result,$i,"category_name");?>

		 <option><?php echo "$field3</br>";?>
  
		<?php
		$i++;
		}
		?>
		</select></br>
		Brand:
		<select>
		<?php $query="SELECT brand_associated FROM category_list";
		$result=mysql_query($query);
		$num=mysql_numrows($result);
		$i=0;
		while($i<$num)
		{

		$field3=mysql_result($result,$i,"brand_associated");?>

		 <option><?php echo "$field3</br>";?>
  
		<?php
		$i++;
		}
		?>
		</select>
		<input name="submit" type="submit" value="save" />
	</form>
	</div>
	
	

            </ul>  
        </div>  
        <div id="content_2" class="content">  
            <ul>  
               <?php
 

?>
	<div align="right">
	<a href="logout.php"> Log Out </a>
	</div>
	<div align="center">
<form name="myform" action="check2.php" method="post">
		Add Category:
		<input name="category" type="text" /></br>
		
		Super Categories:
		<select>
		<?php $query="SELECT category_name FROM top_category_list";
		$result=mysql_query($query);
		$num=mysql_numrows($result);
		$i=0;
		while($i<$num)
		{

		$field3=mysql_result($result,$i,"category_name");?>

		 <option><?php echo "$field3</br>";?>
  
		<?php
		$i++;
		}
		?>
		</select></br>
		
		<input name="submit" type="submit" value="save" />
	</form> 
	</div>
            </ul>  
        </div>  
        <div id="content_3" class="content">  
            <ul>  
                <?php

?><img src= "tick.jpg" height="20" width="20"/> <label style="color:green;"><?php echo "Your previous record has been saved";?></label>


	<div align="right">
	<a href="logout.php"> Log Out </a>
	</div>
	<div align="center">
<form name="myform" action="check3.php" method="post">
		Add Brand:
		<input name="brand" type="text" /></br>
		
		Categories:
		<select name="cat1">
		<?php 
		$query="SELECT category_name FROM category_list";
		$result=mysql_query($query);
		$num=mysql_numrows($result);
		$i=0;
		while($i<$num)
		{

		$field3=mysql_result($result,$i,"category_name");?>

		 <option><?php echo "$field3</br>";?>
  
		<?php
		$i++;
		}
		?>
		</select></br>
		Tags:
		<input name="tag" type="text" /></br>
		<font style="font-style:italic;" size="2" face="arial" color="grey">
 (give # before giving tag name)</font></br>
		
		<input name="submit" type="submit" value="save" />
	</form>
	</div>
            </ul>  
        </div>  
		
  
    </div>  
	
  
</div>  

</div>
 </div>

</body>  
</html>  
